package com.example.component;

import com.example.FlowContext;
import com.yomahub.liteflow.annotation.LiteflowComponent;
import com.yomahub.liteflow.annotation.LiteflowMethod;
import com.yomahub.liteflow.core.NodeComponent;
import com.yomahub.liteflow.enums.LiteFlowMethodEnum;
import com.yomahub.liteflow.enums.NodeTypeEnum;

@LiteflowComponent
public class SwitchCmp {

    @LiteflowMethod(value = LiteFlowMethodEnum.PROCESS_SWITCH, nodeId = "deviceChooser", nodeName = "BFF适配逻辑", nodeType = NodeTypeEnum.SWITCH)
    public String deviceChooser(NodeComponent bindCmp) {
        FlowContext contextBean = bindCmp.getContextBean(FlowContext.class);
        return contextBean.getDevice() + "Adapter";
    }
}
